<!DOCTYPE html>
<html lang="ch">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .mini_login2{
            position:absolute;
            z-index:2;
            margin-top: 100px;
            background:white;
        }
        .mini_login2 .item2{
            width:320px;
            margin:0 auto;
            height:48px;
            line-height:48px;
            padding:0 20px;
        }

        /* 登录窗第一行*/
        .mini_login2 .firstLine2{
            color:#666;
            background:#f7f7f7;
            font-size:18px;
            font-weight:bold;
            cursor:move;
        }
        .mini_login2 .item2 .login_close2{
            display:inline-block;
            float:right;
            cursor:pointer;
        }

        .mini_login2 .item2 label{
            font-size:14px;
            margin-right:15px;
        }
        .mini_login2 .item input2{
            display:inline-block;
            height:60%;
            width:70%;
        }
        /* 登录按钮 */
        .mini_login2 .item2 a.btn_login2{
            display:block;
            margin:10px 10% 0;
            height:30px;
            line-height:30px;
            width:80%;
            background:#4490F7;
            color:white;
            font-size:16px;
            font-weight:bold;
            text-align:center;
        }


        /* 遮罩层样式 */
        .cover{
            /*display:none;*/
            width:100%;
            height:100%;
            position:absolute;
            top:0;
            left:0;
            z-index:1;
            background-color:#000;
            opacity:0.3;
        }
    </style>
    <script src="../static/jquery-3.5.1.js"></script>
</head>
<body>
http://47.107.87.99:8080
<div class="mini_login2" id="mini_login2">
    <!-- 表单 -->
        <div class="item2 firstLine2" id="firstLine2">
            <span class="login_title2">注册</span>
            <span class="login_close2" id="btn_close2">X</span>
        </div>
        <div class="item2">
            <label>账号</label>
            <input type="text" id="account" />
        </div>
        <div class="item2">
            <label>密码</label>
            <input type="password" id="password" />
        </div>
        <div class="item2">
            <button id="submit2">提交</button>
        </div>
</div>

<!-- 遮罩层 -->
<div class="cover"></div>
？
<a href="register">测试跳转注册</a>
</body>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
    $("#submit2").click(function () {
        var username = $("#account").val();
        var password = $("#password").val();
         /*$.ajax({
            url: "http://47.107.87.99:8080/user/userInput",
            data: {
                account: username,
                password: password,
            },
            type: "POST",
            success: function res(result) {
                if (result === true) {
                    alert(result)
                    // window.location.href="index.html"
                } else {
                    alert(result)
                }
            }
        });*/
        axios({
            method: 'post',
            url: 'http://47.107.87.99:8080/user/userInput',
            data: qs.stringify({
                account: username,
                password: password,
            })
        }).then((res) => {
            console.log(res);
        })
    })
</script>
</html>
